package liquidfs.data;

public enum SharingMode {
   
   NONE,
   READ,
   WRITE;
   
   public boolean permits (OpenMode mode)
   {
      return (
         mode == OpenMode.NONE || 
         (this == SharingMode.READ && mode == OpenMode.READ) ||
         this == SharingMode.WRITE
      );
   }
}